<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/11/6
  Time: 16:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript">
        function editCustomer(){
            var form = document.forms[0];
            form.action = "${pageContext.request.contextPath}/addCustomer";
            form.method="post";
            form.submit();
        }
    </script>
</head>
<body>
<form action="" name="customerFormedit">
<table width="60%" border="1" cellpadding="2" cellspacing="0">
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>密码</th>
        <th>电话</th>
        <th>地址</th>

    </tr>
    <c:forEach items="${customer}" var="customer">
        <tr>
            <td>${customer.cid }</td>
            <td>${customer.cust_name}</td>
            <td>${customer.cust_pwd }</td>
            <td>${customer.cust_phone }</td>
            <td>${customer.cust_address }</td>

        </tr>
    </c:forEach>
</table>
    <input type="button" value="添加" onclick="editCustomer()">
</form>
</body>
</html>
